package com.bw.module_store.adapter

import android.graphics.Color
import com.bw.module_store.R
import com.bw.module_store.entity.AddStoreResult
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
/**
 * 智慧园区-01-商家推荐-v1.1-吴熙-20250511
 */
class StoreMerchantAdapter2:BaseQuickAdapter<AddStoreResult,BaseViewHolder>(R.layout.item_store2) {
    override fun convert(holder: BaseViewHolder, item: AddStoreResult) {
        holder.setText(R.id.tv_approve_num,"申请编号：${item.applicationNumber}")
        holder.setText(R.id.tv_approve_time,"申请时间：${item.processingSteps[item.processingSteps.size-1].stepTime}")
        holder.setText(R.id.tv_approve_status,if (item.processingSteps[item.processingSteps.size-1].business.equals("新建"))"未确认" else "已确认")

        holder.setBackgroundResource(R.id.tv_approve_status,if (item.processingSteps[item.processingSteps.size-1].business.equals("新建")) R.drawable.bg_deep_green else R.drawable.bg_deep_blue)
        holder.setTextColor(R.id.tv_approve_status,Color.WHITE)
    }
}